<?php
function imageResize($width, $height, $target) {



if ($width > $height) {
$percentage = ($target / $width);
}
else {

$percentage = ($target / $height);
}

$width = round($width * $percentage);
$height = round($height * $percentage);


return "width=\"$width\" height=\"$height\"";
//End of function
}


function imageResizeVector($width, $height, $target) {



if ($width > $height) {
$percentage = ($target / $width);
}
else {

$percentage = ($target / $height);
}

$width = round($width * $percentage);
$height = round($height * $percentage);

$array[0] = $width;
$array[1] = $height;

return $array;
//End of function
}

?>







